<template>
  <a-extract-style>
    <a-layout class="layout">
      <a-layout-header>
        <Header style="max-width: 1280px;margin: 0 auto;"/>
      </a-layout-header>
      <a-layout-content>
        <div style="max-width: 1280px;margin: 0 auto;">
          <Breadcrumb v-if="showBreadcrumb" :crumbs="breadcrumbs" class="breadcrumb-container" />
          <nuxt-page></nuxt-page>
        </div>
      </a-layout-content>
      <a-layout-footer>
        <Footer />
      </a-layout-footer>
    </a-layout>
  </a-extract-style>
</template>
<script setup>
import 'ant-design-vue/dist/reset.css';
import { useBreadcrumb } from '~/composables/useBreadcrumb';

// 使用面包屑组合式函数
const { breadcrumbs, showBreadcrumb } = useBreadcrumb();
</script>
<style scoped>
.breadcrumb-container {
  margin-top:32px;
}

.site-layout-content {
  min-height: 280px;
  padding: 24px;
  background: #fff;
}

#components-layout-demo-top .logo {
  float: left;
  width: 120px;
  height: 31px;
  margin: 16px 24px 16px 0;
  background: rgba(255, 255, 255, 0.3);
}

.ant-row-rtl #components-layout-demo-top .logo {
  float: right;
  margin: 16px 0 16px 24px;
}

:deep(.ant-layout-header) {
  background: #fff;
  height: 72px;
  padding: 0 32px !important;
  border-bottom: 1px solid var(--Gray-100, #F3F4F6)!important;
  /* Card Shadow */
  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05)!important;
}
:deep(.ant-layout-footer) {
  background-color: #ffffff;
  padding: 0 32px !important;
}

:deep(.ant-layout-content) {
  background-color: #F9FAFB !important;
  padding: 0 32px !important;
}


:deep(.ant-input-affix-wrapper) {
  width: 18.5rem;
}

.layout{
  margin: 0 auto;
}

@media screen and (max-width: 1280px) {
  :deep(.ant-layout-content) {
    background-color: #F9FAFB !important;
    padding: 0 12px !important;
  }
  :deep(.ant-layout-header) {
    background: #fff;
    height: 64px;
    padding: 0 12px;
  }
  :deep(.ant-layout-footer) {
    padding: 0 12px;
  }
}
</style>